import {defineStore} from 'pinia';
import { ref } from 'vue'


export const useUserStore = defineStore('xgxd-user',
    () =>{
        const token = ref(null)
        function setToken(newToken) {
            token.value = newToken;
        }
        function removeToken() {
             token.value = null
        }
        return {token,setToken,removeToken}
    },{
        persist:true
    }
    )
